x86/emul: Remove opencoded exception generation
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 2 Nov 2016 15:59:49 +0000 (15:59 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 2 Dec 2016 17:23:01 +0000 (17:23 +0000)
commitbac133d43324a3fb5435990c4c25a43031081db9
tree0cc08c0059eb327c7d212eceaa8751561858f2ca
parent1d60efc574854e0f10502d8d8f7820af0823cec3
x86/emul: Remove opencoded exception generation

Introduce generate_exception() for unconditional exception generation, and
replace existing uses.  Both generate_exception() and generate_exception_if()
are updated to make their error code parameters optional, which removes the
use of the -1 sentinal.

The ioport_access_check() check loses the presence check for %tr, as the x86
architecture has no concept of a non-usable task register.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <JBeulich@suse.com>
xen/arch/x86/x86_emulate/x86_emulate.c